<template>
  <t-page-one
      :form-desc="formDesc"
      add-url="/sys/account/add" update-url="/sys/account/update"
      url-query-by-id="/sys/account/query/one/"
      url-delete-by-ids="/sys/account/deleteByIds"
      url="/sys/account/query/page"
  >
  </t-page-one>
</template>

<script>
export default {
  data() {
    return {
      /* 表单 */
      formDesc: {
        nickName: {
          label: '昵称',
          type: 'input',
          rules: [
            {required: true, message: '该项必填', trigger: 'blur'},
            {min: 1, max: 20, message: '长度在 1 到 20 个字符', trigger: 'blur'},
            {pattern: /^[\u4E00-\u9FA5A-Za-z0-9_]+$/, message: '由数字、字母、下划线组成', trigger: 'blur'},
          ],
          //表格列配置
          colCfg:{
            width:'180'
          }
        },
        account: {
          label: '登录账号',
          type: 'input',
          rules: [
            {required: true, message: '该项必填', trigger: 'blur'},
            {min: 1, max: 20, message: '长度在 1 到 20 个字符', trigger: 'blur'},
            {pattern: /^[A-Za-z0-9_]+$/, message: '由中文、数字、字母、下划线组成', trigger: 'blur'},
          ],
          colCfg:{
            width:'180'
          }
        },
        accType: {
          label: '账号类型',
          type: 'radio',
          rules: [
            {required: true, message: '该项必填', trigger: 'blur'},
          ],
          colCfg:{
            width:'180'
          },
          dictCode:"ACCTYPE"
        },
        avatar: {
          label: '头像',
          type: 'image',
          title: '是否必填',
          // 值类型为字符串 / 数组
          default: [
            'https://cube.elemecdn.com/6/94/4d3ea53c084bad6931a56d5158a48jpeg.jpeg',
            // 'https://fuss10.elemecdn.com/8/27/f01c15bb73e1ef3793e64e6b7bbccjpeg.jpeg'
          ],
          style: {
            // 可以在此调整大小
            width: '200px',
            height: '200px'
          },
          attrs: {
            isShowPreview: true // 默认值开启图片预览功能，可以设置为false，关闭
          }
        },
      },
    }
  },
  methods: {},
  mounted() {
  }
}
</script>

<style scoped>

</style>